<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Configuring Nagios</title>

<STYLE type="text/css">
<!--
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
        .PageTitle { font-family: verdana,arial,serif; font-size: 12pt; font-weight: bold; }
-->      
</STYLE>

</head>

<body bgcolor="#FFFFFF" text="black" class="Default">

<p>
<div align="center">
<h2 class="PageTitle">Configuring Nagios</h2>
</div>
</p>
<hr>

<p>
<strong><u>Configuration Overview</u></strong>
</p>
<p>
There are several different configuration files that you're going to need to create or edit before you start monitoring anything.  They are described below...
</p>

<p>
<strong><u>Main Configuration File</u></strong>
</p>

<p>
The main configuration file (usually <i>/usr/local/nagios/etc/nagios.cfg</i>) contains a number of directives that affect how Nagios operates.  This config file is read by both the Nagios process and the CGIs.  This is the first configuration file you're going to want to create or edit.
</p>

<p>
Documentation for the main configuration file can be found <a href="configmain.html">here</a>.
</p>

<p>
A sample main configuration file is generated automatically when you run the <b>configure</b> script before compiling the binaries.  Look for it either in the distribution directory or the etc/ subdirectory of your installation.  When you <a href="installing.html">install</a> the sample config files using the <b>make install-config</b> command, a sample main configuration file will be placed into your settings directory (usually /usr/local/nagios/etc). The default name of the main configuration file is <b>nagios.cfg</b>.
</p>

<p>
<strong><u>Resource File(s)</u></strong>
</p>

<p>
Resource files can be used to store user-defined <a href="macros.html">macros</a>.  Resource files can also contain other information (like database connection settings), although this will depend on how you've compiled Nagios.  The main point of having resource files is to use them to store sensitive configuration information and not make them available to the CGIs.
</p>

<p>
You can specify one or more optional resource files by using the <a href="configmain.html#resource_file">resource_file</a> directive in the <a href="configmain.html">main configuration file</a>.
</p>

<p>
<strong><u>Object Definition Files</u></strong>
</p>

<p>
Object definition files are used to define hosts, services, hostgroups, contacts, contactgroups, commands, etc.  This is where you define what things you want monitor and how you want to monitor them.
</p>

<p>
Documentation for the object definition files can be found <a href="configobject.html">here</a>.
</p>

<p>
<strong><u>CGI Configuration File</u></strong>
</p>

<p>
The CGI configuration file (usually <i>/usr/local/nagios/etc/cgi.cfg</i>) contains a number of directives that affect the operation of the <a href="cgis.html">CGIs</a>.
</p>

<p>
Documentation for the CGI configuration file can be found <a href="configcgi.html">here</a>.
</p>

<p>
A sample CGI configuration file is generated automatically when you run the <b>configure</b> script before compiling the binaries. When you <a href="installing.html">install</a> the sample config files using the <b>make install-config</b> command, the CGI configuration file will be placed in the same directory as the main and host config files (usually /usr/local/nagios/etc).  The default name of the CGI configuration file is <b>cgi.cfg</b>.
</p>

<hr>

</body>
</html>
